<%@ page language="java" import="java.util.*,com.king.cms.common.PowerParameter,com.king.cms.orm.*" pageEncoding="UTF-8"%>
<%@ include file="../../include/css.jsp"%>
<%-- /*包含css样式表*/ --%> 
<%   
	String pageFunc = "人员设置";		//功能描述
%>
<%
	int pow=(PowerParameter.save | PowerParameter.cls | PowerParameter.list);
	
	List list = (List)request.getAttribute("list");
	CmsUser cmsUser=(CmsUser)request.getAttribute("cmsUser"); 
%>


<html>
	<head>
		<title><%=pageFunc%>
		</title>
		<meta  http-equiv="Expires"     CONTENT="0">           
<meta  http-equiv="Cache-Control"     CONTENT="no-cache">           
<meta  http-equiv="Pragma"     CONTENT="no-cache">
		<script language="javascript">
	function doEnable()
	{
		form1.bmMc.disabled=false;
		form1.bmBzrs.disabled=false;
	}
	function ki_save(){

	 if(clskg(document.getElementById("userName").value) != ''){
	 	form1.submit();
	 }else {
	   alert('姓名不能为空');
	 }
	}
	function ki_cls(){
		form1.reset();
	}
	function ki_list(){
		window.open('<%=basePath%>user.do?doClass=list','_self');
	}
	////////除去空格/////////
	function clskg(va){
	  var th=/\s/g;
	 va=va.replace(th,'');
	 return va;
	}
</script>
	</head>
	<body background="<%=imgpath%>top3.gif" leftmargin="0" topmargin="0">
		<p>&nbsp;</p>
<form name="form1" action="<%=path%>/user.do?doClass=saveamend" method="post">
	<center>	
	<table border="0" cellpadding="0" cellspacing="0" width="100%" height="2">
    <tr>
      <td width="9" height="1">
      </td>
      <td  height="1" background="<%=path%>/img/images_06.gif">
      <p align="center"><b><%=pageFunc%></b></td>
      <td width="9" height="1">
      </td>
    </tr>
    </table>

	<table border="0" cellpadding="0" cellspacing="0" width="70%" height="1">
		<tr>
		  <td height="3">
		  </td>
		</tr>
	</table>       
	<table height="48" border="0" cellpadding="2" cellspacing="1" class="bg_table" style="width:70%" bordercolor="#111111">
	   <tr class="top_td"> 
		<td colspan="4"></td>
	  </tr>
  
          <tr class="td2">
            <td width="20%">姓名</td>
            <td width="30%"><input name="id" type ="hidden" value="<%=cmsUser.getId() %>">
			<input name="userName" type ="text" class="area100" check="c_n_50" style="width:90%" value="<%=cmsUser.getUserName() %>" >
            </td>

            <td width="20%">性别</td>
            <td width="30%"><select name="userSex" style="width:90%">
                <option value="0"  <%if(cmsUser.getUserSex().intValue()==0)out.print("selected"); %>>男</option>
                <option value="1" <%if(cmsUser.getUserSex().intValue()==1)out.print("selected"); %>>女</option>
              </select></td>
          </tr>
          <tr class="td2"> 
            <td>部门</td>
            <td>
			         <select name="deptId" style="width: 140px">
			         <% Iterator iterator = list.iterator(); 
			         while(iterator.hasNext())
			         {
			         CmsDept cmsDept = (CmsDept)iterator.next();
			         %>
				  <option value="<%=cmsDept.getId()%>" <%if(cmsUser.getDeptId().intValue()==cmsDept.getId().intValue() )out.print("selected"); %>><%=cmsDept.getDeptName()  %></option>
				  <%} %>
				</select>        
             </td>
            <td>职务</td>
             <td>		 
				<input name="userDuty" type="text" class="area100" size="5" style="width:90%" check="c_y_512" value="<%=cmsUser.getUserDuty() %>"> 
	        </td>
          </tr>
		  <tr class="top_td" >
			<td  colspan="4"></td>
		  </tr>
     </table>
  </center>
</form>
		</body>
</html>
<%@ include file="../../pow.jsp"%>